package com.alisls.demo.sso.server.controller;

import com.alisls.demo.sso.server.util.TokenUtil;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import javax.servlet.http.HttpSession;

/**
 * 登出管理
 *
 * @author Ke Wang
 */
@Controller
public class LogoutController {

    @RequestMapping("/logout")
    public String logout(HttpSession httpSession) {
        // 销毁全局会话
        httpSession.invalidate();
        System.out.println("执行统一登出方法，设置Session失效");
        return "logout";
    }

}
